xquery version "1.0-ml";

xdmp:set-response-content-type("text/html"),
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',


<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

	<title>manual index page</title>
	<body>

		<a href="list/listWines.xqy">List All Wines</a><br/>
		<a href="lib/util/listUserXML.xqy">List User XML (missing - get from portino)</a><br/> <!-- see portino for this -->
		<br/>
		
		<a href="lib/newWine.xqy">Add Wine</a><br/>
		<a href="edit/editWine.xqy">Edit Wine</a><br/>
		<br/>

		<a href="lib/saveWines.xqy">Backup Current Wines</a><br/>
		<br/>
		<a href="lib/loadWinesBackup.xqy">Load (Replace) Backed Up Wines</a><br/>
		<a href="lib/insertWinesBackup.xqy">Load (Add) Backed Up Wines</a><br/>
		<br/>
		<a href="lib/util/createUserDoc.xqy">Create (overwrite) User</a><br/>
		<a href="lib/loadId.xqy">Load/Reload Id Doc</a><br/>
		<br/>


<!--
		<a href="load/loadWines.xqy">Load Wines</a><br/>
		<a href="load/loadWineries.xqy">Load Wineries</a><br/>
		<a href="load/loadVarietals.xqy">Load Varietals</a><br/>
		<a href="load/loadInventory.xqy">Load Inventory</a><br/>
		<a href="load/loadAppellations.xqy">Load Appellations</a><br/>
		<a href="load/loadVintages.xqy">Load Vintages</a><br/>
		<a href="load/loadId.xqy">Load ID Counter</a><br/>
-->
<pre>
Portino

home page
	- recently added wines
	- recently consumed
	- wish list
	- wines to be consumed/in danger of going bad
	- scour news for wines in inventory???/general wine news

*** consumed entry
	- started by decrementing an inventory bottle (icon) brings up consumed notes info to fill in
	- can also simplys add an entry directly and manually decrement
	- consumed bottle: drank, gift, tasting notes, date consumed, by whom, with whom etc..
	- ("to do" feature saves queue of things like decremented bottles to fill in notes later<br/>

Tasting Notes
	- add new notes as needed dynamically
	- potetntially use a second pop-up editor?

Inventory
	- inventory history (when decremented, when added etc...)
	- each inventory line is a complete inventory line item
	- edit existing inventory directly or create a new inventory entry
	- or add a new inventory entry - for a new purchase - include purchase notes - new purchase icon to create a new line to add it on to
	- add from where it was purchased
	- advanced costing - tax, shipping


Blend
	- as a new graspe is added another line opens to allow the next grape to be inserted.

*** Wish List
	- for tracking wines that you want to get
	- will show up in inventory as a wine with 0 inventory and wish checked
	- when wish list box is checked can then add - number of bottles desired, price desired, any notes

General System
	- track changes/history
	- offline work

*** Add vs Edit
	- add an ID based on the current time down to the 1000's place in ms. get current datetime, strip out non-numerics, add any trailing zeros, check to see that it is not in use and then add it
	- alternatively create a counter in the databse to get an id.
		
	- short term can prepopulate the the add page
	- in general support direct edit where entry is saved as it is added
	- when adding a wine the form should look the same
	-adding a wine though an id is set-up for the first time, this id should ony become permanent after the first bit of information is saved for that wine. otherwise many "empty" wines may be created.
	- form there on the form is just like editing a wine.

Sub Editors (has additional detail for that element
	- currently all data is added and edited from a single form
	- wine
	- winery
	- varietals
	- appellations

Bugs
	- Quotes in a text entry will be stored safely. However, when the components are loading a drop down list teh quotes casue the entire operation to fail - see brunell "Tenuta Nuova"

Other
	- try Laszlo implementation

</pre>

</body>
</html>